﻿@{
    Layout = "";
}

<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

    <meta http-equiv="Pragma" content="no-cache">
    <meta http-equiv="Cache-Control" content="no-cache">
    <meta http-equiv="Expires" content="0">
    <title>@System.Configuration.ConfigurationManager.AppSettings["AppTitle"]</title>
    <script type="text/javascript" src="@Url.Content("/BaseResource/Plugin/jquery/jquery.min.js")"></script>
    <script type="text/javascript" src="@Url.Content("/BaseResource/Plugin/layer/layer.js")"></script>
    <script type="text/javascript" src="@Url.Content("/BaseResource/Script/mfbase.js")"></script>
    <link type="text/css" href="@Url.Content("~/Content/login/login.css")" rel="stylesheet" />
    <script language="javascript" type="text/javascript">
        function login() {
            if ($("#txtName").val() == '用户名') {
                $("#txtName").focus();
            }
            else if (!$("#txtPwd").val()) {
                $("#password_text").hide();
                $("#txtPwd").show();
                $("#txtPwd").focus();
            }
            else
            {
                $("#btnLogin").val("登录中...");
                $("#btnLogin").attr("disabled", "disabled");
                addAjaxParam("Name", $("#txtName").val());
                addAjaxParam("Pwd", $("#txtPwd").val());
                //addAjaxParam("RememberMe", $("#ckLogin")[0].checked);
                commitAjax("/PortalLTE/Login/UserLogin", {
                    CallBack: function (data) {
                        if (data) {
                            window.location.href = "/PortalLTE/Main/Index";
                        }
                        else
                        {
                            msgBox('登录失败,用户名或密码错误');
                            $("#btnLogin").removeAttr("disabled");
                            $("#btnLogin").val("登录");
                        }
                    }
                });
            }
            //$('#btn').linkbutton('enable');
        }
    </script>
</head>

<body>
    <div class="login_box">
        <div class="login">
            <div class="login_logo"><img src="~/Content/login/login_logo.png"></div>
            <div class="login_name">
                <p></p>
            </div>
            <form id="ff" method="post">
                <input name="username" type="text" value="用户名" id="txtName" onfocus="this.value=''" onblur="if(this.value==''){this.value='用户名'}">
                <span id="password_text" onclick="this.style.display='none';document.getElementById('txtPwd').style.display='block';document.getElementById('txtPwd').focus();">密码</span>
                <input name="password" type="password" id="txtPwd" style="display:none;" onblur="if(this.value==''){document.getElementById('password_text').style.display='block';this.style.display='none'};">
                <input value="登录" style="width:100%;" id="btnLogin" type="button" onclick="login()">
            </form>
        </div>
        <div class="copyright">@System.Configuration.ConfigurationManager.AppSettings["Copyright"];</div>
    </div>


</body>
</html>